﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdEdUserIO : OdRxObject
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdEdUserIO(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdEdUserIO_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdEdUserIO obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdEdUserIO()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdEdUserIO(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new static OdEdUserIO cast(OdRxObject pObj)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = GlobalsPINVOKE.OdEdUserIO_cast(OdRxObject.getCPtr(pObj));
			OdEdUserIO result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdEdUserIO)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdEdUserIO)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdEdUserIO)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdRxClass desc()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdEdUserIO_desc(), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxClass isA()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdEdUserIO_isA(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxObject queryX(OdRxClass protocolClass)
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdEdUserIO_queryX(this.swigCPtr, OdRxClass.getCPtr(protocolClass)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdEdUserIO createObject()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = GlobalsPINVOKE.OdEdUserIO_createObject();
			OdEdUserIO result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdEdUserIO)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdEdUserIO)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdEdUserIO)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual int getKeyword(string prompt, string keywords, int defVal, int options, OdEdIntegerTracker pTracker)
		{
			int result = GlobalsPINVOKE.OdEdUserIO_getKeyword__SWIG_0(this.swigCPtr, prompt, keywords, defVal, options, OdEdIntegerTracker.getCPtr(pTracker));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual int getKeyword(string prompt, string keywords, int defVal, int options)
		{
			int result = GlobalsPINVOKE.OdEdUserIO_getKeyword__SWIG_1(this.swigCPtr, prompt, keywords, defVal, options);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual int getKeyword(string prompt, string keywords, int defVal)
		{
			int result = GlobalsPINVOKE.OdEdUserIO_getKeyword__SWIG_2(this.swigCPtr, prompt, keywords, defVal);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual int getKeyword(string prompt, string keywords)
		{
			int result = GlobalsPINVOKE.OdEdUserIO_getKeyword__SWIG_3(this.swigCPtr, prompt, keywords);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual int getInt(string prompt, int options, int defVal, string keywords, OdEdIntegerTracker pTracker)
		{
			int result = GlobalsPINVOKE.OdEdUserIO_getInt__SWIG_0(this.swigCPtr, prompt, options, defVal, keywords, OdEdIntegerTracker.getCPtr(pTracker));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual int getInt(string prompt, int options, int defVal, string keywords)
		{
			int result = GlobalsPINVOKE.OdEdUserIO_getInt__SWIG_1(this.swigCPtr, prompt, options, defVal, keywords);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual int getInt(string prompt, int options, int defVal)
		{
			int result = GlobalsPINVOKE.OdEdUserIO_getInt__SWIG_2(this.swigCPtr, prompt, options, defVal);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual int getInt(string prompt, int options)
		{
			int result = GlobalsPINVOKE.OdEdUserIO_getInt__SWIG_3(this.swigCPtr, prompt, options);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual int getInt(string prompt)
		{
			int result = GlobalsPINVOKE.OdEdUserIO_getInt__SWIG_4(this.swigCPtr, prompt);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double getReal(string prompt, int options, double defVal, string keywords, OdEdRealTracker pTracker)
		{
			double result = GlobalsPINVOKE.OdEdUserIO_getReal__SWIG_0(this.swigCPtr, prompt, options, defVal, keywords, OdEdRealTracker.getCPtr(pTracker));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double getReal(string prompt, int options, double defVal, string keywords)
		{
			double result = GlobalsPINVOKE.OdEdUserIO_getReal__SWIG_1(this.swigCPtr, prompt, options, defVal, keywords);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double getReal(string prompt, int options, double defVal)
		{
			double result = GlobalsPINVOKE.OdEdUserIO_getReal__SWIG_2(this.swigCPtr, prompt, options, defVal);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double getReal(string prompt, int options)
		{
			double result = GlobalsPINVOKE.OdEdUserIO_getReal__SWIG_3(this.swigCPtr, prompt, options);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double getReal(string prompt)
		{
			double result = GlobalsPINVOKE.OdEdUserIO_getReal__SWIG_4(this.swigCPtr, prompt);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual string getString(string prompt, int options, string defValue, string keywords, OdEdStringTracker pTracker)
		{
			string result = GlobalsPINVOKE.OdEdUserIO_getString__SWIG_0(this.swigCPtr, prompt, options, defValue, keywords, OdEdStringTracker.getCPtr(pTracker));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual string getString(string prompt, int options, string defValue, string keywords)
		{
			string result = GlobalsPINVOKE.OdEdUserIO_getString__SWIG_1(this.swigCPtr, prompt, options, defValue, keywords);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual string getString(string prompt, int options, string defValue)
		{
			string result = GlobalsPINVOKE.OdEdUserIO_getString__SWIG_2(this.swigCPtr, prompt, options, defValue);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual string getString(string prompt, int options)
		{
			string result = GlobalsPINVOKE.OdEdUserIO_getString__SWIG_3(this.swigCPtr, prompt, options);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual string getString(string prompt)
		{
			string result = GlobalsPINVOKE.OdEdUserIO_getString__SWIG_4(this.swigCPtr, prompt);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void putString(string arg0)
		{
			GlobalsPINVOKE.OdEdUserIO_putString(this.swigCPtr, arg0);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdCmColorBase getCmColor(string prompt, int options, OdCmColorBase pDefaultValue, string keywords, OdEdColorTracker pTracker)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = GlobalsPINVOKE.OdEdUserIO_getCmColor__SWIG_0(this.swigCPtr, prompt, options, OdCmColorBase.getCPtr(pDefaultValue), keywords, OdEdColorTracker.getCPtr(pTracker));
			OdCmColorBase result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdCmColorBase(cPtr, true));
				result = new OdCmColorBase(cPtr, false);
			}
			else
			{
				result = new OdCmColorBase(cPtr, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmColorBase getCmColor(string prompt, int options, OdCmColorBase pDefaultValue, string keywords)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = GlobalsPINVOKE.OdEdUserIO_getCmColor__SWIG_1(this.swigCPtr, prompt, options, OdCmColorBase.getCPtr(pDefaultValue), keywords);
			OdCmColorBase result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdCmColorBase(cPtr, true));
				result = new OdCmColorBase(cPtr, false);
			}
			else
			{
				result = new OdCmColorBase(cPtr, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmColorBase getCmColor(string prompt, int options, OdCmColorBase pDefaultValue)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = GlobalsPINVOKE.OdEdUserIO_getCmColor__SWIG_2(this.swigCPtr, prompt, options, OdCmColorBase.getCPtr(pDefaultValue));
			OdCmColorBase result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdCmColorBase(cPtr, true));
				result = new OdCmColorBase(cPtr, false);
			}
			else
			{
				result = new OdCmColorBase(cPtr, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmColorBase getCmColor(string prompt, int options)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = GlobalsPINVOKE.OdEdUserIO_getCmColor__SWIG_3(this.swigCPtr, prompt, options);
			OdCmColorBase result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdCmColorBase(cPtr, true));
				result = new OdCmColorBase(cPtr, false);
			}
			else
			{
				result = new OdCmColorBase(cPtr, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdCmColorBase getCmColor(string prompt)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = GlobalsPINVOKE.OdEdUserIO_getCmColor__SWIG_4(this.swigCPtr, prompt);
			OdCmColorBase result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdCmColorBase(cPtr, true));
				result = new OdCmColorBase(cPtr, false);
			}
			else
			{
				result = new OdCmColorBase(cPtr, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual string getFilePath(string prompt, int options, string dialogCaption, string defExt, string fileName, string filter, string keywords, OdEdStringTracker pTracker)
		{
			string result = GlobalsPINVOKE.OdEdUserIO_getFilePath__SWIG_0(this.swigCPtr, prompt, options, dialogCaption, defExt, fileName, filter, keywords, OdEdStringTracker.getCPtr(pTracker));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual string getFilePath(string prompt, int options, string dialogCaption, string defExt, string fileName, string filter, string keywords)
		{
			string result = GlobalsPINVOKE.OdEdUserIO_getFilePath__SWIG_1(this.swigCPtr, prompt, options, dialogCaption, defExt, fileName, filter, keywords);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual string getFilePath(string prompt, int options, string dialogCaption, string defExt, string fileName, string filter)
		{
			string result = GlobalsPINVOKE.OdEdUserIO_getFilePath__SWIG_2(this.swigCPtr, prompt, options, dialogCaption, defExt, fileName, filter);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual string getFilePath(string prompt, int options, string dialogCaption, string defExt, string fileName)
		{
			string result = GlobalsPINVOKE.OdEdUserIO_getFilePath__SWIG_3(this.swigCPtr, prompt, options, dialogCaption, defExt, fileName);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual string getFilePath(string prompt, int options, string dialogCaption, string defExt)
		{
			string result = GlobalsPINVOKE.OdEdUserIO_getFilePath__SWIG_4(this.swigCPtr, prompt, options, dialogCaption, defExt);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual string getFilePath(string prompt, int options, string dialogCaption)
		{
			string result = GlobalsPINVOKE.OdEdUserIO_getFilePath__SWIG_5(this.swigCPtr, prompt, options, dialogCaption);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual string getFilePath(string prompt, int options)
		{
			string result = GlobalsPINVOKE.OdEdUserIO_getFilePath__SWIG_6(this.swigCPtr, prompt, options);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual string getFilePath(string prompt)
		{
			string result = GlobalsPINVOKE.OdEdUserIO_getFilePath__SWIG_7(this.swigCPtr, prompt);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void putError(string errmsg)
		{
			GlobalsPINVOKE.OdEdUserIO_putError(this.swigCPtr, errmsg);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
